package OnJava8.functional;

/**
 * @Auther DRevelation
 * @Date 2020-05-20 下午 13:30
 * @Desc
 */
public class RecursiveFactorial {
    static IntCall fact;

    public static void main(String[] args) {
        fact = n -> n == 0 ? 1 : n * fact.call(n-1);
        for (int i = 0; i <= 10; i++) {
            System.out.println(fact.call(i));
        }
    }
}
